package tools;

import java.util.Enumeration;

public class ToolListIterator
{
	// Components
	 private Enumeration<Object> enumer;
	 
	 /**
	   * Constructor that creates an iterator for the specified ToolList
	   * 
	   * @param list ToolList to iterate over
	   */
	  public ToolListIterator(java.util.Vector<Object> list) { enumer = list.elements(); }
	  
	  /**
	   * Checks if more elements are present
	   * 
	   * @return true if the list contains more elements
	   */
	  public boolean hasNext() { return enumer.hasMoreElements(); }

	  /**
	   * Fetches the next element advancing the iterator by one location
	   * 
	   * @return the next element in the list
	   */
	  public Object next() { return enumer.nextElement(); }
}
